import Layout from "@/views/layout/index";

const authorityRouter = {
  path: "/authority",
  name: "role",
  component: Layout,
  meta: {
    title: "职位管理",
    icon: "iconfont icon-daishenpi"
  },
  redirect: "/authority/manage",
  children: [
    {
      path: "manage",
      name: "authorityManage",
      component: () => import("@/views/authority/manage"),
      meta: {
        title: "职位管理",
        api: ["role"],
        icon: "iconfont icon-daishenpi",
        authority: ["list"]
      },
      checkedList: [],
      rights: [
        {
          value: "list",
          label: "列表"
        },
        {
          value: "edit",
          label: "配置权限"
        }
      ]
    },
    {
      path: "config",
      name: "authorityConfig",
      component: () => import("@/views/authority/config"),
      hidden: true,
      meta: {
        title: "配置权限",
        api: ["role"],
        authority: ["edit"]
      }
    },
    {
      path: "list",
      name: "authorityList",
      component: () => import("@/views/authority/list"),
      hidden: true,
      meta: {
        title: "教师列表",
        api: ["role"],
        authority: ["create", "edit", "details"]
      }
    },
    {
      path: "operation",
      name: "authorityOperation",
      component: () => import("@/views/authority/operation"),
      hidden: true,
      meta: {
        title: "新增教师",
        api: ["role"],
        authority: ["create", "edit", "details"]
      }
    }
  ]
};

export default authorityRouter;
